$(function () {
    findAll("","1");
});
function findAll(id,page) {
    let result = myAjax('/getFacilitiesModelList', 'get', {id:id,page:page});
    let data = result.list;
    let pageCount = Math.ceil(result.number/10);
    let html = "";
    for (let i = 0; i < data.length; i++) {
        html += '<li class="text-list">\n' +
            '                    <div>\n' +
            '                        <div class="first-style">\n' +
            '                            <div>▷</div>\n' +
            '                            <div onclick="conversionThis()">[' + data[i].type + ']</div>\n' +
            '                        </div>\n' +
            '                        <div onclick="jumpFacilitiesDetails(' + data[i].id + ')">' + data[i].title + '</div>\n' +
            '                    </div>\n' +
            '                    <div>' + data[i].releaseTime + '</div>\n' +
            '                </li>';
    }
    aa(pageCount,page);
    $("#setFacilitiesDta").html(html);
}

function conversionThis() {
    location.assign("/html/facilities.html");
}

function jumpFacilitiesDetails(id) {
    localStorage.setItem("facilitiesId", id);
    window.open("/html/facilitiesDetails.html");
}
